const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// 约束条件
const usersSchema = new Schema({
    user:{
        type:String,
        unique:true,
        required:true
    },
    password:{
        type:String,
        required:true,
        default:'123'
    }
})
// 创建模型对象 并且将其暴露
module.exports = mongoose.model('users',usersSchema);